
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-html1"></use>
                    </svg>
                    <div class="name">html</div>
                    <div class="fontclass">#icon-html1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-geshishua"></use>
                    </svg>
                    <div class="name">格式刷</div>
                    <div class="fontclass">#icon-geshishua</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-svgmoban04"></use>
                    </svg>
                    <div class="name">投票</div>
                    <div class="fontclass">#icon-svgmoban04</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-chexiao"></use>
                    </svg>
                    <div class="name">撤销</div>
                    <div class="fontclass">#icon-chexiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shanchuchaolianjie1"></use>
                    </svg>
                    <div class="name">删除超链接1</div>
                    <div class="fontclass">#icon-shanchuchaolianjie1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icxiangmufuhaodaishuzi24px"></use>
                    </svg>
                    <div class="name">有序列表</div>
                    <div class="fontclass">#icon-icxiangmufuhaodaishuzi24px</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-duanhouju1"></use>
                    </svg>
                    <div class="name">段后距</div>
                    <div class="fontclass">#icon-duanhouju1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-duanqianju1"></use>
                    </svg>
                    <div class="name">段前距</div>
                    <div class="fontclass">#icon-duanqianju1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xieti"></use>
                    </svg>
                    <div class="name">斜体</div>
                    <div class="fontclass">#icon-xieti</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-youduiqi1"></use>
                    </svg>
                    <div class="name">右对齐</div>
                    <div class="fontclass">#icon-youduiqi1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zuoduiqi2"></use>
                    </svg>
                    <div class="name">左对齐</div>
                    <div class="fontclass">#icon-zuoduiqi2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-youfudong1"></use>
                    </svg>
                    <div class="name">右浮动</div>
                    <div class="fontclass">#icon-youfudong1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zuofudong1"></use>
                    </svg>
                    <div class="name">左浮动</div>
                    <div class="fontclass">#icon-zuofudong1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qingkongwendang"></use>
                    </svg>
                    <div class="name">清空文档</div>
                    <div class="fontclass">#icon-qingkongwendang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-juzhongfudong"></use>
                    </svg>
                    <div class="name">居中浮动</div>
                    <div class="fontclass">#icon-juzhongfudong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-moren"></use>
                    </svg>
                    <div class="name">默认</div>
                    <div class="fontclass">#icon-moren</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zitiyinying"></use>
                    </svg>
                    <div class="name">字体阴影</div>
                    <div class="fontclass">#icon-zitiyinying</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shipin"></use>
                    </svg>
                    <div class="name">视频</div>
                    <div class="fontclass">#icon-shipin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-702bianjiqi_zhongzuo"></use>
                    </svg>
                    <div class="name">702编辑器_重做</div>
                    <div class="fontclass">#icon-702bianjiqi_zhongzuo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-712bianjiqi_zidongpaiban"></use>
                    </svg>
                    <div class="name">712编辑器_自动排版</div>
                    <div class="fontclass">#icon-712bianjiqi_zidongpaiban</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-761bianjiqi_teshuzifu"></use>
                    </svg>
                    <div class="name">761编辑器_特殊字符</div>
                    <div class="fontclass">#icon-761bianjiqi_teshuzifu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jiacu"></use>
                    </svg>
                    <div class="name">加粗</div>
                    <div class="fontclass">#icon-jiacu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-word1"></use>
                    </svg>
                    <div class="name">word</div>
                    <div class="fontclass">#icon-word1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-liebiaowuxu"></use>
                    </svg>
                    <div class="name">列表无序</div>
                    <div class="fontclass">#icon-liebiaowuxu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-chaolianjie"></use>
                    </svg>
                    <div class="name">超链接</div>
                    <div class="fontclass">#icon-chaolianjie</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-beijingse"></use>
                    </svg>
                    <div class="name">背景色</div>
                    <div class="fontclass">#icon-beijingse</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zitiyanse"></use>
                    </svg>
                    <div class="name">字体颜色</div>
                    <div class="fontclass">#icon-zitiyanse</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-juzhong2"></use>
                    </svg>
                    <div class="name">居中</div>
                    <div class="fontclass">#icon-juzhong2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-hangjianju_icon"></use>
                    </svg>
                    <div class="name">行间距_icon</div>
                    <div class="fontclass">#icon-hangjianju_icon</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-toupiao"></use>
                    </svg>
                    <div class="name">投票</div>
                    <div class="fontclass">#icon-toupiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tupian"></use>
                    </svg>
                    <div class="name">图片 (1)</div>
                    <div class="fontclass">#icon-tupian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fengexian"></use>
                    </svg>
                    <div class="name">分割线</div>
                    <div class="fontclass">#icon-fengexian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-quanping"></use>
                    </svg>
                    <div class="name">全屏</div>
                    <div class="fontclass">#icon-quanping</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-comment-face3"></use>
                    </svg>
                    <div class="name">表情</div>
                    <div class="fontclass">#icon-comment-face3</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xiahuaxian"></use>
                    </svg>
                    <div class="name">下划线</div>
                    <div class="fontclass">#icon-xiahuaxian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-caijiwenzhang"></use>
                    </svg>
                    <div class="name">采集文章</div>
                    <div class="fontclass">#icon-caijiwenzhang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shanchuxian"></use>
                    </svg>
                    <div class="name">删除线</div>
                    <div class="fontclass">#icon-shanchuxian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yinpin"></use>
                    </svg>
                    <div class="name">音频</div>
                    <div class="fontclass">#icon-yinpin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qingchugeshi"></use>
                    </svg>
                    <div class="name">清除格式</div>
                    <div class="fontclass">#icon-qingchugeshi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-biaoge"></use>
                    </svg>
                    <div class="name">表格</div>
                    <div class="fontclass">#icon-biaoge</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-liangbianduiqi1"></use>
                    </svg>
                    <div class="name">两边对齐</div>
                    <div class="fontclass">#icon-liangbianduiqi1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shangbiao"></use>
                    </svg>
                    <div class="name">上标</div>
                    <div class="fontclass">#icon-shangbiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xiabiao"></use>
                    </svg>
                    <div class="name">下标</div>
                    <div class="fontclass">#icon-xiabiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-suojin"></use>
                    </svg>
                    <div class="name">缩进</div>
                    <div class="fontclass">#icon-suojin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zifubiankuang"></use>
                    </svg>
                    <div class="name">字符边框</div>
                    <div class="fontclass">#icon-zifubiankuang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yinyong"></use>
                    </svg>
                    <div class="name">引用</div>
                    <div class="fontclass">#icon-yinyong</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
